"Burger menu"
Bootstrap 4.1.1 Snippet by ALIMUL AL RAZY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<header>
<div id="navLogo"><a href=""><img src="https://img.favpng.com/9/25/22/logo-graphic-design-interior-design-services-art-png-favpng-S9Kunp9En6GnvGwjHeQhq27LM.jpg" /></a></div>
<svg class="hamburger" viewBox="0 0 80 80">
<line class="line01" x1="0" y1="3" x2="80" y2="3" />
<line class="line02" x1="0" y1="40" x2="80" y2="40" />
<line class="line03" x1="0" y1="77" x2="80" y2="77" />
</svg>
</header>
<div class="menu">
<nav class="navigation">
<ul>
<li><a class="" href="">Portfolio</a></li>
<li><a class="" href="">About</a></li>
<li><a class="" href="">Blog</a></li>
</ul>
</nav>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
<script>
var $hamburger = $('.hamburger');
TweenLite.set('.line01',{x:40});
TweenLite.set('.line03',{x:-40});
TweenLite.set('.navigation',{xPercent:-50, yPercent:-50})
TweenLite.set('.navigation li',{x:-110});
var hamburgerMotion = new TimelineMax()
.to('.line03',0.4,{x:'-=40'},0)
.to('.line01',0.4,{x:'+=40'},0)
.to('.menu',0.4,{autoAlpha:1},0)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
body {
margin: 0;
background-color:grey;
font-family:sans-serif;
}
header{
position: relative;
width: 95%;
height: 55px;
margin: 20px 5% 0 0;
}
header img{
width:110px;
}
#navLogo{
position: absolute;
width: 100px;
float: left;
font-size: 40px;
line-height: 40px;
font-weight: 800;
margin-left:30px;
z-index:2;
}
a{
text-decoration: none;
color:white;
}
.hamburger{
position: absolute;
top: 6px;
left: auto;
right: 0px;
width: 32px;
cursor:pointer;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: